<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?php session_start();
  include_once 'backend/get_stories.php';
  include_once 'backend/breadcrumb.php';
  $iterationId= $_GET['id'];
?>
  
<html xmlns = "http://www.w3.org/1999/xhtml">
	<head>
		<title>
			Iterations
		</title>
		
		<script type="text/javascript" src="scripts/jquery-1.11.1.min.js"></script>		
		<script type="text/javascript" src="scripts/breadcrumb.js"></script>
		<script type="text/javascript" src="scripts/url-parameter.js"></script>
		<script type="text/javascript" src="scripts/iterations.js"></script>
		<link rel="stylesheet" type="text/css" href="css/main.css" />		
	</head>
	
	<body>	
		<p id="iterationHeader" class="header">Iteration</p>
		<div id="breadcrumb"><?php echo iterationBreadCrumb($iterationId); ?></div>

		<div class="left">
			<p class="subheader">
				User Stories
			</p>
			<p>
				<?php 
					$arrStories = getListOfStoriesForIteration();
					foreach($arrStories as $story){
						echo "<p><a href=\"story.php?id=$story[story_id]&taskUrl=0\">$story[story_name]</a></p>";
					}
				?>
			</p>
			<input type="button" value="New Story" onclick="linkToStory(0)"/>
		</div>
		
		<div class="right">
			<p class="subheader">
				Tasks
			</p>
			<p>
				<ul>	
				<?php 
					$arrTask = getListOfTasksForIteration();
					foreach($arrTask as $task){
						echo "<li><a href=\"story.php?id=$task[story_id]&taskUrl=$task[task_id]\">$task[task_name]</a></p>";
					}
				?>
				</ul>
			</p>
		</div>
	</body>
</html>